<label class="caption1">
    线路列表
</label>
<%= render :partial => "admin/new_link", :locals =>{:url => new_admin_tour_path, :name => "线路"} %>
<br/>
<br/>
<table class="grid" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>
                线路名称
            </th>
            <th>
                创建时间
            </th>
            <th>
                所属分类
            </th>
            <th>
                操作
            </th>
        </tr>
    </thead>
    <tbody>
        <% for tour in @tours %>
        <tr>
            <td>
                <%= link_to tour.name, [:admin, tour] %>
            </td>
            <td class="center">
                <%= tour.created_at.to_date %>
            </td>
            <td>
                <%= link_to tour.tour_category.name, [:admin, tour.tour_category] %>
            </td>
            <td class="center">
                <%= render :partial => "admin/edit_link", :locals =>{:url => edit_admin_tour_path(tour)} %>
                |<%= render :partial => "admin/destroy_link", :locals =>{:url => [:admin, tour], :name => "线路“#{tour.name}”"} %>
            </td>
        </tr>
        <% end %>
    </tbody>
</table>
